
public class MyArray<T> {
    public T[] arr = (T[]) new Object[10];
    public T getPos(int x){
        return arr[x];
    }
    public void setPos(int x,T value){
        arr[x] = value;
    }
    public static void main(String[] args) {
        MyArray<Integer> myArray = new MyArray();
        myArray.setPos(0,1);
        myArray.setPos(1,2);
        System.out.println(myArray.getPos(1));
    }
}
